import com.itdfq.resttemplate.RestTemplateApplication;
import com.itdfq.resttemplate.entity.HouseInfo;
import com.itdfq.resttemplate.entity.StoreSynchroParam;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.client.RestTemplate;

import java.util.ArrayList;
import java.util.List;

/**
 * @author: QianMo
 * @date: 2021/12/7 16:22
 * @mark:
 */
@RunWith(SpringRunner.class)
@SpringBootTest(classes = RestTemplateApplication.class)
public class Demo {

    @Autowired
    private RestTemplate restTemplate;

    @Test
    public void send() {
        List<StoreSynchroParam> list = new ArrayList<>();
        for (int i = 0; i < 1000; i++) {
            list.add(new StoreSynchroParam("快捷键门店" + i, "客户公司", "idnumber", true, "浙江省", "杭州市", "萧山区", "详细地址",
                    116.240873, 39.925029, "默认图片","电话", "韩信" + i, "韩信手机号" + i, i + 2));
        }
        String  msg = restTemplate.postForObject("http://localhost:8082/open/enter/storeSynchro", list, String.class);
        System.out.println(msg);

    }
}
